<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>音频和视频 | Introduction</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../HTML/iframe.html" />
    
    
    <link rel="prev" href="../HTML/实体字符.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.3.1"
        data-chapter-title="音频和视频"
        data-filepath="HTML/audio&amp;vdieo.md"
        data-basepath=".."
        data-revision="Sun Sep 23 2018 23:38:49 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="Notes/notes.html">
            
                
                    <a href="../Notes/notes.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        知识库
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="Notes/git的使用.html">
            
                
                    <a href="../Notes/git的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        git的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="Notes/emmet快捷法.html">
            
                
                    <a href="../Notes/emmet快捷法.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        emmet快捷法
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="HTML/index.html">
            
                
                    <a href="../HTML/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        HTML5
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="HTML/什么是html5.html">
            
                
                    <a href="../HTML/什么是html5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        什么是html5
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="HTML/a链接.html">
            
                
                    <a href="../HTML/a链接.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.1.</b>
                        
                        a链接
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="HTML/img.html">
            
                
                    <a href="../HTML/img.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.2.</b>
                        
                        图片
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="HTML/元素.html">
            
                
                    <a href="../HTML/元素.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.3.</b>
                        
                        元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="HTML/标签.html">
            
                
                    <a href="../HTML/标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.4.</b>
                        
                        标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="HTML/列表.html">
            
                
                    <a href="../HTML/列表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.5.</b>
                        
                        列表
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="HTML/table&amp;form.html">
            
                
                    <a href="../HTML/table&amp;form.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        表格和表单
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="HTML/form表单.html">
            
                
                    <a href="../HTML/form表单.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.1.</b>
                        
                        form表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="HTML/table表格.html">
            
                
                    <a href="../HTML/table表格.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.2.</b>
                        
                        table表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.3" data-path="HTML/常用表单类型.html">
            
                
                    <a href="../HTML/常用表单类型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.3.</b>
                        
                        常用表单类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.4" data-path="HTML/实体字符.html">
            
                
                    <a href="../HTML/实体字符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.4.</b>
                        
                        实体字符
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="HTML/多媒体和iframe.html">
            
            <span><b>2.3.</b> 多媒体和iframe</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="2.3.1" data-path="HTML/audio&amp;vdieo.html">
            
                
                    <a href="../HTML/audio&amp;vdieo.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.1.</b>
                        
                        音频和视频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="HTML/iframe.html">
            
                
                    <a href="../HTML/iframe.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.2.</b>
                        
                        iframe
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.3" data-path="HTML/blog.html">
            
                
                    <a href="../HTML/blog.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.3.</b>
                        
                        其它
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="CSS/css3.html">
            
                
                    <a href="../CSS/css3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        CSS3
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="CSS/选择器.html">
            
                
                    <a href="../CSS/选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="CSS/属性选择器.html">
            
                
                    <a href="../CSS/属性选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="CSS/伪类选择器.html">
            
                
                    <a href="../CSS/伪类选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="CSS/盒子模型.html">
            
                
                    <a href="../CSS/盒子模型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >Introduction</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="audiovideo">audio&amp;video</h1>
<pre><code class="lang-html"><span class="hljs-doctype">&lt;!DOCTYPE html&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">charset</span>=<span class="hljs-value">&quot;utf-8&quot;</span> /&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">title</span>&gt;</span>audio&#x548C;video<span class="hljs-tag">&lt;/<span class="hljs-title">title</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">body</span>&gt;</span>

        <span class="hljs-comment">&lt;!--
            audio  &#x4F7F;&#x7528;&#x97F3;&#x9891;&#x7684;&#x6807;&#x7B7E;
                - src       &#x5F15;&#x5165;&#x7684;&#x8D44;&#x6E90;
                - controls  &#x63A7;&#x5236;&#x9762;&#x677F;(&#x5728;&#x4E0D;&#x540C;&#x7684;&#x6D4F;&#x89C8;&#x5668;&#x4E0B;&#xFF0C;&#x6837;&#x5F0F;&#x4F1A;&#x6709;&#x6240;&#x4E0D;&#x540C;)
                - autoplay  &#x81EA;&#x52A8;&#x64AD;&#x653E;
                - preload   &#x9884;&#x52A0;&#x8F7D;
                - muted     &#x9759;&#x97F3;

                - volume    &#x97F3;&#x91CF;(&#x7531;js&#x63A7;&#x5236;)
        --&gt;</span>

        <span class="hljs-tag">&lt;<span class="hljs-title">audio</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;media/music.mp3&quot;</span> <span class="hljs-attribute">controls</span> <span class="hljs-attribute">preload</span> <span class="hljs-attribute">muted</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-title">audio</span>&gt;</span>

        <span class="hljs-comment">&lt;!--
            &#x517C;&#x5BB9;&#x591A;&#x79CD;&#x683C;&#x5F0F;&#x6587;&#x4EF6;&#x7684;&#x5199;&#x6CD5;
                source&#x6807;&#x7B7E;&#x7528;&#x4E8E;&#x5F15;&#x5165;&#x8D44;&#x6E90;&#x4F7F;&#x7528;
                    - type  &#x89C4;&#x5B9A;&#x6587;&#x4EF6;&#x7684;&#x7C7B;&#x578B;
        --&gt;</span>

        <span class="hljs-tag">&lt;<span class="hljs-title">audio</span> <span class="hljs-attribute">width</span>=<span class="hljs-value">&quot;800px&quot;</span> <span class="hljs-attribute">height</span>=<span class="hljs-value">&quot;&quot;</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">source</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;media/ogg.mp3&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;audio/mp3&quot;</span>/&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">source</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;media/ogg.ogg&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;audio/ogg&quot;</span>/&gt;</span>
            &#x5F53;&#x524D;&#x6D4F;&#x89C8;&#x5668;&#x4E0D;&#x652F;&#x6301;audio&#x76F4;&#x63A5;&#x64AD;&#x653E;&#xFF0C;&#x70B9;&#x51FB;&#x8FD9;&#x91CC;&#x4E0B;&#x8F7D;&#x97F3;&#x9891;&#xFF1A;<span class="hljs-tag">&lt;<span class="hljs-title">a</span> 
                <span class="hljs-attribute">href</span>=<span class="hljs-value">&quot;&quot;</span>&gt;</span>&#x4E0B;&#x8F7D;&#x97F3;&#x9891;<span class="hljs-tag">&lt;/<span class="hljs-title">a</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-title">audio</span>&gt;</span>


        <span class="hljs-comment">&lt;!--
            &#x683C;&#x5F0F;&#x5DE5;&#x5382;&#x7B49;&#x538B;&#x7F29;&#x5DE5;&#x5177;&#x7684;&#x9ED8;&#x8BA4;&#x8BBE;&#x7F6E;&#x672A;&#x5FC5;&#x9002;&#x5408;&#x6D4F;&#x89C8;&#x5668;&#x4F7F;&#x7528;

            &#x6D4F;&#x89C8;&#x5668;&#x5BF9;mp4&#x7684;&#x7F16;&#x7801;&#x65B9;&#x5F0F;&#x8981;&#x6C42;&#x7684;&#x975E;&#x5E38;&#x4E25;&#x683C;
            &#x89C6;&#x9891;&#x7F16;&#x7801;&#x5FC5;&#x987B;&#x662F;   H.264
                        &#x97F3;&#x9891;&#x7F16;&#x7801;&#x5FC5;&#x987B;&#x662F;   AAC            
        --&gt;</span>

        <span class="hljs-comment">&lt;!--
            &#x4E00;&#x4E2A;&#x89C6;&#x9891;&#x5F15;&#x5165;&#x591A;&#x4E2A;&#x683C;&#x5F0F;&#xFF0C;&#x9884;&#x9632;&#x6D4F;&#x89C8;&#x5668;&#x7684;&#x4E0D;&#x652F;&#x6301;
            media/video.flv
            media/video.mp4
            media/video.webm
        --&gt;</span>

        <span class="hljs-tag">&lt;<span class="hljs-title">video</span> <span class="hljs-attribute">width</span>=<span class="hljs-value">&quot;800&quot;</span> <span class="hljs-attribute">height</span>=<span class="hljs-value">&quot;&quot;</span> <span class="hljs-attribute">controls</span> <span class="hljs-attribute">autoplay</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">source</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;media/video.flv&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-title">source</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">source</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;media/video.mp4&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;video/mp4&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-title">source</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">source</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;media/video.webm&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;video/webm&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-title">source</span>&gt;</span>

            &#x5F53;&#x524D;&#x6D4F;&#x89C8;&#x5668;&#x4E0D;&#x652F;&#x6301; video&#x76F4;&#x63A5;&#x64AD;&#x653E;&#xFF0C;&#x70B9;&#x51FB;&#x8FD9;&#x91CC;&#x4E0B;&#x8F7D;&#x89C6;&#x9891;&#xFF1A; <span class="hljs-tag">&lt;<span class="hljs-title">a</span> 
                <span class="hljs-attribute">href</span>=<span class="hljs-value">&quot;myvideo.webm&quot;</span>&gt;</span>&#x4E0B;&#x8F7D;&#x89C6;&#x9891;<span class="hljs-tag">&lt;/<span class="hljs-title">a</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-title">video</span>&gt;</span>

    <span class="hljs-tag">&lt;/<span class="hljs-title">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">html</span>&gt;</span>
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../HTML/实体字符.html" class="navigation navigation-prev " aria-label="Previous page: 实体字符"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../HTML/iframe.html" class="navigation navigation-next " aria-label="Next page: iframe"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
